﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.Xpo;
using Zero.DataLayer.Donnees.Tarifs;

namespace Zero.DataLayer.Donnees
{
    public class XpoPlanPresse: XPBaseObject
    {
          public XpoPlanPresse()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

          public XpoPlanPresse(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }


        private Guid _Oid;
        [Key]
         public Guid Oid
        {
            get { return _Oid; }
            set { SetPropertyValue("Oid", ref _Oid, value); }
        }





        private string _Name;
        public string Name
        {
            get { return _Name; }
            set { SetPropertyValue("Name", ref _Name, value); }
        }


        private int _NombreSig;
        public int NombreSig
        {
            get { return _NombreSig; }
            set { SetPropertyValue("NombreSig", ref _NombreSig, value); }
        }




        private XpoCompaign _Compaign;
        [Aggregated, Association("XpoCompaign-PlanPresses")]
        public XpoCompaign Compaign
        {
            get { return _Compaign; }
            set { SetPropertyValue("Compaign", ref _Compaign, value); }
        }


        [ Association("XpoPlanPresse-Signalitique")]
        public XPCollection<Signalitique> Signalitiques
        {
            get { return GetCollection<Signalitique>("Signalitiques"); }
        }



        [Aggregated, Association("XpoPlanPresse-XpoInsertionPresse")]
        public XPCollection<XpoInsertionPresse> XpoInsertionPresses
        {
            get { return GetCollection<XpoInsertionPresse>("XpoInsertionPresses"); }
        }


        [Aggregated, Association("XpoPlanPresse-XpoMapSupportTarifPr")]
        public XPCollection<XpoMapSupportTarifPr> XpoMapSupportTarifPrs
        {
            get { return GetCollection<XpoMapSupportTarifPr>("XpoMapSupportTarifPrs"); }
        }
    }



    public class XpoMapSupportTarifPr : XPBaseObject
    {
        public XpoMapSupportTarifPr ()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public XpoMapSupportTarifPr(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }


        private Guid _Oid;

        [Key]
        public Guid Oid
        {
            get { return _Oid; }
            set { SetPropertyValue("Oid", ref _Oid, value); }
        }


        private XpoSupportPresse _supportPresse;
        [Association("XpoMapSupportTarifPr -XpoSupportPresse")]
        public XpoSupportPresse supportPresse
        {
            get { return _supportPresse; }
            set { SetPropertyValue("supportPresse", ref _supportPresse, value); }
        }





        private XpoTarifPr _tarifPr;
        [Association("XpoMapSupportTarifPr -XpoTarifPr")]
        public XpoTarifPr tarifPr
        {
            get { return _tarifPr; }
            set { SetPropertyValue("tarifPr", ref _tarifPr, value); }
        }




        private XpoPlanPresse _PlanPresse;
        [Aggregated, Association("XpoPlanPresse-XpoMapSupportTarifPr")]
        public XpoPlanPresse PlanPresse
        {
            get { return _PlanPresse; }
            set { SetPropertyValue("PlanPresse", ref _PlanPresse, value); }
        }

    }



}
